#ifndef _STDTHREAD_H_
#define _STDTHREAD_H_

struct StdThread;
typedef struct StdThread Thread;

Thread *InitThread(void* (*funcPtr)(void *),void *arg);

void* ThreadJoin(Thread *t);
void ThreadDetach(Thread *t);
void ThreadCancel(Thread *t);
unsigned long int GetThreadID(Thread *t);
void ClearThread(Thread *t);

struct StdMutex;
typedef struct StdMutex Mutex;

Mutex* InitMutex();
void MutexLock(Mutex *m);
void MutexUnlock(Mutex *m);
void ClearMutex(Mutex *m);

struct StdCond;
typedef struct StdCond Cond;

Cond* InitCond();
void CondWait(Cond *c, Mutex *m);
void CondSignal(Cond *c);
void CondBroadcast(Cond *c);

void ClearCond(Cond *c);
#endif